// 统一管理api接口
import request from "@/utils/request";
import type { loginForm, reqRespones, reqUser, backLogout } from "./type";

// 枚举接口
enum API {
    LOGIN_URL = "/admin/acl/index/login",
    USERINFO_URL = "/admin/acl/index/info",
    BACKLOGIN_URL='/admin/acl/index/logout'
}

// 请求
export const reqLogin = (data: loginForm) =>
    request.post<any, reqRespones>(API.LOGIN_URL, data);
// 响应
export const reqUserInfo = () => request.get<any, reqUser>(API.USERINFO_URL);
// 退出
export const backLoginAPI = () => request.post<any, backLogout>(API.BACKLOGIN_URL);